﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Micro.Extensions.Refit
{
    public class RefitOption
    {
        public bool Enabled { get; set; } = false;

        private int _Timeout = 60000;
        /// <summary>
        /// 超时，毫秒
        /// </summary>
        public int Timeout
        {
            get { return _Timeout; }
            set
            {
                _Timeout = value > 0 ? value : 60000;
            }
        }

        public RefitInfo[] RefitUrls { get; set; }


        public class RefitInfo
        {
            public string Url { get; set; }

            public string[] Interfacs { get; set; }

            public int Timeout { get; set; } = 0;
        }
    }
}
